package com.main.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Id;;

@Entity
@Table(name = "CHARTS_DETAIL")
public class ChartsDetail{

	private int Id;
	private int views;
	private int likes;
	private int comments;
	private int total;
	private Charts charts;
	private Troll troll;

	@Id
	@Column(name="Id")
	public int getId() {
		return Id;
	}

	public void setId(int id) {
		Id = id;
	}

	@Column(name = "Views")
	public int getViews() {
		return views;
	}

	public void setViews(int views) {
		this.views = views;
	}

	@Column(name = "Likes")
	public int getLikes() {
		return likes;
	}

	public void setLikes(int likes) {
		this.likes = likes;
	}

	@Column(name = "Comments")
	public int getComments() {
		return comments;
	}

	public void setComments(int comments) {
		this.comments = comments;
	}

	@Column(name = "Total")
	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "ChartsId", nullable = false)
	public Charts getCharts() {
		return charts;
	}

	public void setCharts(Charts charts) {
		this.charts = charts;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "TrollId", nullable = false)
	public Troll getTroll() {
		return troll;
	}

	public void setTroll(Troll troll) {
		this.troll = troll;
	}

}
